/*
	Written By Pradipna Nepal
	www.pradsprojects.com

	Copyright (C) 2011 Prads Projects
	Please read COPYING.txt included along with this source code for more detail.
	If not included, see http://www.gnu.org/licenses/
*/

#include "libEmuROMLoader.h"

int romSize = 0;

bool ROMLoader::loadROM(unsigned char *cMem) {
	std::ifstream romFile;

	romFile.open("test.c16", std::ios::binary | std::ios::ate);
	if (romFile.is_open()) {
		romSize = romFile.tellg();
		romFile.seekg(0, std::ios::beg);
		romFile.read((char*)cMem, romSize);
		romFile.close();
	} else {
		return false;
	}
	return true;
}